function sumInput() {
    let input = prompt("input:");
    let sum = 0;
    while (!((input === '') || (input === null) || !isFinite(input))) {
        sum += Number(input);
        input = prompt("input:");
    }
    return sum;
}

alert(sumInput());